<?php require_once('../Connections/Conexion.php'); 
/* $txtrutone = $_GET['txtrutone'] */

require_once('class.ezpdf.php');
$pdf =& new Cezpdf('a4');
$pdf->selectFont('fonts/Courier.afm');
$pdf->ezSetCmMargins(1,1,1.5,1.5);

mysql_select_db("udp", $Conexion);
$queEmp = "SELECT NOMBRES , FONO1, DIRECCION, E_MAIL FROM alumno ORDER BY NOMBRES ASC";
$resEmp = mysql_query($queEmp, $Conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);

$ixx = 0;
while($datatmp = mysql_fetch_assoc($resEmp)) { 
	$ixx = $ixx+1;
	$data[] = array_merge($datatmp, array('num'=>$ixx));
}

$titles = array(
			    'num'=>'<b>Num</b>',
				'NOMBRES'=>'<b>ALUMNOS</b>',
				'DIRECCION'=>'<b>DIRECCION</b>',
				'FONO'=>'<b>TELEFONO</b>',
				'E_MAIL'=>'<b>E_MAIL</b>'
			);
$options = array(
				'shadeCol'=>array(0.9,0.9,0.9),
				'xOrientation'=>'center',
				'width'=>500
			);
$txttit = "<b>UNIVERSIDAD DIEGO PORTALES</b>\n";
$txttit.= "Facultad de Derecho.. Informe por Alumno \n";

$pdf->ezText($txttit, 12);
$pdf->ezTable($data, $titles, '', $options);
$pdf->setLineStyle(5);
$pdf->ezText("\n\n\n", 10);
$pdf->ezText("<b>Fecha:</b> ".date("d/m/Y"), 10);
$pdf->ezText("<b>Hora:</b> ".date("H:i:s")."\n\n", 10);
$pdf->ezStream();
?>